﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="TeacherList.aspx.cs" Inherits="Viki1.TeacherList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <link href="../Styles/Page_front-v=20131213103.css" rel="stylesheet" type="text/css" />
<style type="text/css">
        .auto-style1 {
            height: 119px;
            width: 120px;
        }
        .auto-style4 {
            width: 253px;
            height: 260px;
        }
        
    </style>
    <script type="text/javascript">
        function pass() {
            var teacher_id = document.getElementById("MainContent_ListView1_ctrl0_teacher_idLabel_0").value;
            alert(teacher_id);
            window.location = "TeacherDetail.aspx?teacher_id=" + teacher_id;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="bd" class="w989">
  <div class="cur"><a href="../index.aspx">首页</a>&gt;&gt;教师列表</div>
     <div class="h"></div>
     
     <div class="h20"></div>
     <div class="col-l">
<div class="left-menu login">
                    <dl>
                        <dt><p>① 免费水平测试</p><p>② 免费学习计划</p><p>③ 免费试听体验</p></dt>
                        <dd>
                            <form method="post" action="../index.php?m=user&c=index&a=register" id="myform" onsubmit="javascript:chkRegister(this);return false;">
                            <p><span class="e-mail"></span><input name="email"  type="text" maxlength="30" id="email" class="inp" value="E-mail" onblur="if(!this.value){this.value=this.defaultValue;}" onfocus="if (this.value==this.defaultValue){value =''}" /></p>
                            <p><span class="pwd"></span><input name="password"  type="password" maxlength="30" id="password" class="inp" value="输入用户密码" onblur="if(!this.value){this.value='';}" onfocus="if (this.value==this.defaultValue){value =''}"/></p>
                            
                            <p><span class="phone"></span><input name="info[mobile]"  type="text" maxlength="30" id="mobile" class="inp" value="手机号码" onblur="if(!this.value){this.value=this.defaultValue;}" onfocus="if (this.value==this.defaultValue){value =''}"/></p>
							<p><span class="name"></span><input name="tj_code"  type="text" maxlength="30" id="tj_code" class="inp" value="推荐人手机号/留空" onblur="if(!this.value){this.value=this.defaultValue;}" onfocus="if (this.value==this.defaultValue){value =''}"/></p>
                            <input type='hidden' name='dosubmit' value='1'/>
                            <p><input type="submit" name="submit" class="btn-login" value="" /></p>
                            </form>
                        </dd>
                    </dl>
          </div>
          <div class="h20"></div>
          <dl class="ksdh">
              <dt class="right-tit"><strong>快速导航</strong></dt>
              <dd>
                  <ul class="ul-ksdh fix">
                      <li class="icon1"><a href="index.aspx">关于Viki</a></li>
                       <li class="icon2 grey"><a href="TeacherList.aspx">外教团队</a></li>
                      <li class="icon3"><a href="CourseList.aspx">课程设置</a></li>
                      <li class="icon5 grey"><a href="vedio.aspx">上课视频</a></li>
                      <li class="icon6"><a href="ReviewList.aspx">Viki学员心得</a></li>
                      
                  </ul>
              </dd>
          </dl>
          <div class="h20"></div>
           <div class="h20"></div>
           &nbsp;<div class="h20"></div>
           &nbsp;</div>
     <div class="col-r">
          <div class="right-tit">教师简介</div>
          <div class="h20"></div>
            <div >
                <asp:ListView ID="ListView1" runat="server" DataKeyNames="teacher_id" 
                    DataSourceID="SqlDataSource1" GroupItemCount="2" 
                    >
                    <AlternatingItemTemplate>
                         <td class="auto-style1" style="border:3px solid gray;border-right:none;">
                          
                            <asp:Image ID="teacher_imageLabel" runat="server" 
                                ImageUrl='<%# Eval("teacher_image") %>' />
                      </td>

                      <td class="auto-style4" valign="top" style="border:3px solid gray; border-left:none;">
                     <asp:Label ID="teacher_idLabel" runat="server" type="hidden"
                                Text='<%# Eval("teacher_id") %>' /> 
                        外教姓名：<asp:Label ID="teacher_nameLabel" runat="server" 
                                Text='<%# Eval("teacher_name") %>' />  
                          <br />
                        <br />
                          个人专长：<asp:Label ID="teacher_courseLabel" runat="server" 
                                Text='<%# Eval("teacher_course") %>' /><br />
                        <br />
                          性别：女<br />
                          <br />
                          年龄：<asp:Label ID="teacher_ageLabel" runat="server" 
                                Text='<%# Eval("teacher_age") %>' /><br />
                          <br />
                          国家：<asp:Label ID="teacher_countryLabel" runat="server" 
                                Text='<%# Eval("teacher_country") %>' /><br />
                          <br />
                        <div style="text-align:right">
                           <a href="TeacherDetail.aspx?teacher_id=<%# Eval("teacher_id") %>"style="text-decoration:none;font-size:12px">查看详情>></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        </div></td>
                    </AlternatingItemTemplate>
                    <EditItemTemplate>
                        <td runat="server" style="background-color:#008A8C;color: #FFFFFF;">
                            teacher_id:
                            <asp:Label ID="teacher_idLabel1" runat="server" 
                                Text='<%# Eval("teacher_id") %>' />
                            <br />teacher_name:
                            <asp:TextBox ID="teacher_nameTextBox" runat="server" 
                                Text='<%# Bind("teacher_name") %>' />
                            <br />teacher_age:
                            <asp:TextBox ID="teacher_ageTextBox" runat="server" 
                                Text='<%# Bind("teacher_age") %>' />
                            <br />teacher_country:
                            <asp:TextBox ID="teacher_countryTextBox" runat="server" 
                                Text='<%# Bind("teacher_country") %>' />
                            <br />teacher_course:
                            <asp:TextBox ID="teacher_courseTextBox" runat="server" 
                                Text='<%# Bind("teacher_course") %>' />
                            <br />teacher_image:
                            <asp:TextBox ID="teacher_imageTextBox" runat="server" 
                                Text='<%# Bind("teacher_image") %>' />
                            <br />teacher_info:
                            <asp:TextBox ID="teacher_infoTextBox" runat="server" 
                                Text='<%# Bind("teacher_info") %>' />
                            <br />
                            <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="更新" />
                            <br />
                            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="取消" />
                            <br />
                        </td>
                    </EditItemTemplate>
                    <EmptyDataTemplate>
                        <table runat="server" 
                            style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;">
                            <tr>
                                <td>
                                    未返回数据。</td>
                            </tr>
                        </table>
                    </EmptyDataTemplate>
                    <EmptyItemTemplate>
<td runat="server" />
                    </EmptyItemTemplate>
                    <GroupTemplate>
                        <tr ID="itemPlaceholderContainer" runat="server">
                            <td ID="itemPlaceholder" runat="server">
                            </td>
                        </tr>
                    </GroupTemplate>
                    <InsertItemTemplate>
                        <td runat="server" style="">
                            teacher_id:
                            <asp:TextBox ID="teacher_idTextBox" runat="server" 
                                Text='<%# Bind("teacher_id") %>' />
                            <br />teacher_name:
                            <asp:TextBox ID="teacher_nameTextBox" runat="server" 
                                Text='<%# Bind("teacher_name") %>' />
                            <br />teacher_age:
                            <asp:TextBox ID="teacher_ageTextBox" runat="server" 
                                Text='<%# Bind("teacher_age") %>' />
                            <br />teacher_country:
                            <asp:TextBox ID="teacher_countryTextBox" runat="server" 
                                Text='<%# Bind("teacher_country") %>' />
                            <br />teacher_course:
                            <asp:TextBox ID="teacher_courseTextBox" runat="server" 
                                Text='<%# Bind("teacher_course") %>' />
                            <br />teacher_image:
                            <asp:TextBox ID="teacher_imageTextBox" runat="server" 
                                Text='<%# Bind("teacher_image") %>' />
                            <br />teacher_info:
                            <asp:TextBox ID="teacher_infoTextBox" runat="server" 
                                Text='<%# Bind("teacher_info") %>' />
                            <br />
                            <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="插入" />
                            <br />
                            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="清除" />
                            <br />
                        </td>
                    </InsertItemTemplate>
                    <ItemTemplate>
                        <td class="auto-style1" style="border:3px solid gray;border-right:none;">
                          
                            <asp:Image ID="teacher_imageLabel" runat="server" 
                               ImageUrl='<%# Eval("teacher_image") %>' />
                      </td>

                      <td class="auto-style4" valign="top" style="border:3px solid gray; border-left:none;">
                    <asp:Label ID="teacher_idLabel" runat="server" type="hidden"
                                Text='<%# Eval("teacher_id") %>' />  
                        外教姓名：<asp:Label ID="teacher_nameLabel" runat="server" 
                                Text='<%# Eval("teacher_name") %>' />  
                          <br />
                        <br />
                          个人专长：<asp:Label ID="teacher_courseLabel" runat="server" 
                                Text='<%# Eval("teacher_course") %>' /><br />
                        <br />
                          性别：女<br />
                          <br />
                          年龄：<asp:Label ID="teacher_ageLabel" runat="server" 
                                Text='<%# Eval("teacher_age") %>' /><br />
                          <br />
                          国家：<asp:Label ID="teacher_countryLabel" runat="server" 
                                Text='<%# Eval("teacher_country") %>' /><br />
                          <br />
                        <div style="text-align:right">
                           <a  href="TeacherDetail.aspx?teacher_id=<%# Eval("teacher_id") %>" style="text-decoration:none;font-size:12px">查看详情>></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        </div></td>
                    </ItemTemplate>
                    <LayoutTemplate>
                        <table runat="server">
                            <tr runat="server">
                                <td runat="server">
                                    <table ID="groupPlaceholderContainer" runat="server" border="1" 
                                        style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;font-family: Verdana, Arial, Helvetica, sans-serif;">
                                        <tr ID="groupPlaceholder" runat="server">
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr runat="server">
                                <td runat="server" 
                                    style="text-align: center;background-color: #CCCCCC;font-family: Verdana, Arial, Helvetica, sans-serif;color: #000000;">
                                    <asp:DataPager ID="DataPager1" runat="server" PageSize="6">
                                        <Fields>
                                            <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" 
                                                ShowLastPageButton="True" />
                                        </Fields>
                                    </asp:DataPager>
                                </td>
                            </tr>
                        </table>
                    </LayoutTemplate>
                    <SelectedItemTemplate>
                        <td runat="server" 
                            style="background-color:#008A8C;font-weight: bold;color: #FFFFFF;">
                            teacher_id:
                            <asp:Label ID="teacher_idLabel" runat="server" 
                                Text='<%# Eval("teacher_id") %>' />
                            <br />teacher_name:
                            <asp:Label ID="teacher_nameLabel" runat="server" 
                                Text='<%# Eval("teacher_name") %>' />
                            <br />teacher_age:
                            <asp:Label ID="teacher_ageLabel" runat="server" 
                                Text='<%# Eval("teacher_age") %>' />
                            <br />teacher_country:
                            <asp:Label ID="teacher_countryLabel" runat="server" 
                                Text='<%# Eval("teacher_country") %>' />
                            <br />teacher_course:
                            <asp:Label ID="teacher_courseLabel" runat="server" 
                                Text='<%# Eval("teacher_course") %>' />
                            <br />teacher_image:
                            <asp:Label ID="teacher_imageLabel" runat="server" 
                                Text='<%# Eval("teacher_image") %>' />
                            <br />teacher_info:
                            <asp:Label ID="teacher_infoLabel" runat="server" 
                                Text='<%# Eval("teacher_info") %>' />
                            <br />
                        </td>
                    </SelectedItemTemplate>
                </asp:ListView>
              
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:vikiConnectionString2 %>" 
                    SelectCommand="SELECT * FROM [Teacher]"></asp:SqlDataSource>
              
          </div>
</div>
  </div>
</asp:Content>
